package sweezy.swf.encoder
{
	import flash.utils.ByteArray;
	import flash.utils.Endian;
	import sweezy.swf.abc.ABC;

	public class ABCEncoder
	{

		public function ABCEncoder()
		{
		}

		public function encode(abc:ABC):ByteArray
		{
			var bytes:ByteArray = new ByteArray();
			var encoder:ABCEncoderBase = new ABCEncoderBase(bytes);
			encoder.visitABC(abc);

			bytes.position = 0;
			bytes.endian = Endian.BIG_ENDIAN;

			return bytes;
		}
	}
}
